#ifndef NEWWIDGET_H
#define NEWWIDGET_H

#include "QWidget"
#include "QSpinBox"
#include "QSlider"
#include "QHBoxLayout"
#include "QComboBox"
#include "Robot.h"
#include <list>
#include "QLabel"
#include <QTableWidget>

class SpinSlider:public QWidget
{
    Q_OBJECT

public:
    SpinSlider(QWidget *parent = nullptr);
    ~SpinSlider(){delete spin; delete slider;delete lab;}
    void setText(QString str){lab->setText(str);}
    void setValue(double value){valueChanging(value);}
    void setMinMax(double min,double max);
signals:
    void valueChanging(double value);

private:
    QLabel* lab;
    QWidget* wid;
    QHBoxLayout* hlay;
    QDoubleSpinBox* spin;
    QSlider* slider;
    double minimum;
    double maximum;


private slots:
    void valueChanged(double value);
};


class DoubleCombox:public QWidget
{
    Q_OBJECT
public:
    //DoubleCombox()

    explicit DoubleCombox(QWidget *parent = nullptr):QWidget(parent)
    {
        cbx0 = new QComboBox;
        cbx1 = new QComboBox;

        QHBoxLayout* lay = new QHBoxLayout(this);
        lay->addWidget(cbx0);
        lay->addWidget(cbx1);
        lay->setContentsMargins(0,0,0,0);
        lay->setSpacing(0);

    }
    ~DoubleCombox(){delete  cbx0;delete cbx1;}

    QComboBox* cbx0;
    QComboBox* cbx1;

};




#endif // NEWWIDGET_H
